package com.example.aopannotation.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HomeController {

    @RequestMapping(value = "index")
    @ResponseBody
    public String index()
    {
        return "index";

    }



    @GetMapping(value = "/username")
    @ResponseBody
    public String getLoginUserName(String userName, Integer age) {

        return userName + " --- " + age;
    }



}
